/**
 * api接口统一管理
 */
import {get, post } from './ajax.js'
//例如一个post请求
export const login = p => post('api/sso/login', p);
//修改密码
export const changePassword = p => post('api/sso/reset-password', p);
//在组件中可以直接引入使用
// import { login } from '@/request/api';
// login({ username: '185xxxxxxxx', password: '123456'}).then(res => {// 获取数据成功后的其他操作
//     console.log(res)
// })
//工作台列表
export const desktopList = p => get('api/m/menu/index', p);
//员工绩效列表
export const profile = p => get('api/m/user/profile', p); //个人信息
export const checkList = p => get('api/m/performance/lists', p); //员工绩效列表
export const templateTargets = p => get('api/m/performance/templateTargets', p); //绩效-考核指标说明
export const subordinateStaffers = p => get('/api/m/performance/subordinateStaffers', p); //下属绩效列表
export const organizations = p => get('api/m/performance/organizations', p) //组织树
export const guides = p => get('api/m/user/guides', p) //获取店导表示列表
    //延期管理
export const applyDetail = p => get('api/m/Investment/apply', p) //申请-申请详情
export const addApplyGet = p => get('api/m/Investment/check/addGet', p) //获取添加申请
export const addApplyPost = p => get('api/m/Investment/check/addPost', p) //提交添加申请
export const applies = p => get('api/m/Investment/applies', p) //申请-我发起的
export const checking = p => get('api/m/Investment/checking', p); //申请-待我审批的
export const submitCheck = p => get('api/m/Investment/check', p) //审批提交
export const checked = p => get('api/m/Investment/checked', p); //申请-我已审批的
export const staffers = p => get('api/m/Investment/staffers', p); //下属员工-列表
export const staffersDetailLog = p => get('api/m/Investment/staffer/detail/log', p) //下属员工-考核日志
export const staffersDetail = p => get('api/m/Investment/staffer/detail', p) //员工基本信息详情
    //消息提醒
export const noticeNum = p => get('api/m/message/unread', p); //消息提醒数量
export const noticeTypeList = p => get('api/m/message/types', p); //消息分类列表
export const noticeList = p => get('api/m/message/messages', p); //消息列表
//文件上传阿里云验证
export const uploadFile = p => get('api/m/Investment/upload/info', p); //获取上传参数

export const statistics = p => post('api/fin/expenseReimburse/statistics', p); //统计费用报销情况
export const expenseList = p => post('api/fin/expenseReimburse/list', p); //费用报销列表
export const expenseDetail = p => post('api/fin/expenseReimburse/detail', p); //费用报销详情
export const loanList = p => post('api/fin/loan/list', p); //选择冲抵
export const baoxiaoList = p => post('api/fin/loan/baoxiaoList', p); //查看冲抵
export const approvalExpense = p => post('api/fin/expenseReimburse/approval', p); //审批费用报销
export const expenseAdd = p => post('api/fin/expenseReimburse/add', p); //添加费用报销
export const expenseEdit = p => post('api/fin/expenseReimburse/edit', p); //添加费用报销
export const userJobs = p => get('api/m/user/jobs', p) //所属组织 (员工职位列表)
export const companies = p => get('api/m/user/companies', p) //获取公司列表
export const feeTagList = p => post('api/fin/expenseReimburse/feeTagList', p) //获取费用标签列表
export const feeSubjectList = p => post('api/fin/expenseReimburse/feeSubjectList', p) //获取费用项目列表
    // export const approvalProcess = p => post('/api/open/approval', p) //审批流
export const approvalProcess = p => post('api/m/approval', p) //审批流
export const uploadImgs = p => post('api/com/upload/index', p); //获取上传图片参数
export const userOrganization = p => get('api/m/user/organizations', p); //归属部门


//七天延期V3.0
export const checkLineV3 = p => get('api/m/BusinessAssessment/check/check_line', p); //获取审批流
export const staffersV3 = p => get('api/m/BusinessAssessment/assessment/staffers', p); //下属员工
export const historyV3 = p => get('api/m/BusinessAssessment/assessment/history', p); //员工考核历史
export const approveListV3 = p => get('api/m/BusinessAssessment/check/list', p); // 获取审批列表
export const detailV3 = p => get('api/m/BusinessAssessment/check/detail', p) // 单据详情
export const applyListV3 = p => get('api/m/BusinessAssessment/check/add', p) //添加申请列表
export const postApplyV3 = p => post('api/m/BusinessAssessment/check/add', p) //提交申请
export const submitCheckV3 = p => get('/api/m/BusinessAssessment/check/check', p) //提交审批